package jzqb.dao.impl;

import cnki.tpi.kbatis.sqlsession.SqlSession;
import cnki.tpi.kbatis.utils.DataSourceUtil;
import jzqb.bo.VisitBo;
import jzqb.dao.VisitDao;
import org.springframework.stereotype.Repository;

/**
 *
 */
@Repository
public class VisitDaoImpl implements VisitDao {

    @Override
    public VisitBo selectVisit(VisitBo visitBo) {
        SqlSession sqlSession = DataSourceUtil.getSqlSession();
        String statementId = "jzqb.dao.VisitDao.selectVisit";
        return sqlSession.selectOne(statementId, visitBo, false);
    }

    @Override
    public Boolean insertVisit(VisitBo visitBoResult) {
        SqlSession sqlSession = DataSourceUtil.getSqlSession();
        String statementId = "jzqb.dao.VisitDao.insertVisit";
        return sqlSession.executeInsert(statementId, visitBoResult);
    }

    @Override
    public Boolean updateVisit(VisitBo visitBoResult) {
        SqlSession sqlSession = DataSourceUtil.getSqlSession();
        String statementId = "jzqb.dao.VisitDao.updateVisit";
        return sqlSession.executeUpdate(statementId, visitBoResult);
    }
}
